home *** CD-ROM | disk | FTP | other *** search
Text File | 1993-01-14 | 2.1 KB | 74 lines | [TEXT/MPS ] |
- /* _________________________________________________________________________________________________________ //
- Copyright © 1992 Apple Computer, Inc. All rights reserved.
- Macintosh Developer Technical Support.C++ Macintosh Toolbox Framework.
- Programmer: Kent Sandvik
- Date: 11/9/92
- Revision comments are at the end of this file.
- ---
- TEnvironment is a Gestalt wrapper class that finds out information about the environment.
- EnvironmentTest.h contains the test functions for the TEnvironment class.
- _________________________________________________________________________________________________________ */
-
- // INCLUDES
- #ifndef _ENVIRONMENT_
- #include "Environment.h"
- #endif
-
- // This test will check out the functions of the TEnvironment class. We assume that
- // we are running on a fairly typical System 7.0.1/7.1 system.
-
- void main(void)
-
- {
- cout << "Start of TEnvironment test…\n";
- TEnvironment myEnvironment;
-
- // 128k TEST
- if (myEnvironment.Check128k())
- cout << "We have a 128 or better system.\n";
- else
- cout << "We have an ancient Mac…\n";
-
- // APPLEEVENTS TEST
- if (myEnvironment.HasAppleEvents())
- cout << "We have Apple Events.\n";
- else
- cout << "We don't have Apple Events.\n";
-
-
- // COLOR QUICKDRAW TEST
- if (myEnvironment.HasColorQD())
- cout << "We have Color Quickdraw.\n";
- else
- cout << "We don't have Color Quickdraw.\n";
-
- // IS SYSTEM 7?
- if (myEnvironment.IsSystemSeven())
- cout << "We are running under System 7.\n";
- else
- cout << "We are NOT running under System 7.\n";
-
- // TEST GENERIC ATTRIBUTE
- if (myEnvironment.HasAttribute(gestaltFontMgrAttr, gestaltOutlineFonts))
- cout << "We have TrueType font support.\n";
- else
- cout << "We DON'T have TrueType font support.\n";
-
-
- // CHECK IF THE X TRAP IS AVAILABLE
- if (myEnvironment.TrapAvailable(OSTrap, 0xA82A))// Component Manager
- cout << "We have _ComponentDispatch.\n";
- else
- cout << "We don't have _ComponentDispatch.\n";
-
-
- cout << "End of TEnvironment test!\n";
- }
-
- // _________________________________________________________________________________________________________ //
-
- /* Change History (most recent last):
- No Init. Date Comment
- 1 khs 11/9/92 New file
- */
-